<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta charset="utf-8"/>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1" name="viewport"/>
    <meta content="" name="description"/>
    <meta content="" name="keywords"/>
    <title>登录</title>
    <link type="text/css" rel="stylesheet" href="public/plugin/bootstrap/css/bootstrap.css"/>
    <link type="text/css" rel="stylesheet" href="public/css/login_admin.css">
    <script type="text/javascript" src="${pageContext.request.contextPath }/public/plugin/jquery/jquery-1.9.1.min.js"></script>

    <script type="text/javascript">
       function ajaxLogin(){
           var data={username:$("#username").val(),password:$("#password").val()};
           console.info(data);
			$.ajax({
 			    url:"${pageContext.request.contextPath }/common/public/login",
 	 			 data:data,
 	 			 type:"post",
 	 			 success:function(resultJson){
					 if(resultJson.status==1){
 						alert(resultJson.msg);
 						window.location.href="${pageContext.request.contextPath }/admin/index/index";
				      }else{
				    	  alert(resultJson.msg);
					  }
 	 	 	 	 }   
			});
       }
    </script>
</head>
<body>
<div class="login-content">
    <div class="login-from">
        <div class="header-title">
            <h5 class="title-content">用户登录</h5>
            <img class="hear-img" src="public/images/head-img.jpg">
            </img>
            <from onsubmit="return false;" >
                 <div class="input-content">
                     <input class="user-name" type="text" id="username" placeholder="用户名">
                 </div>
                <div class="input-content">
                    <input class="user-name" type="text" id="password" placeholder="密码">
                </div>
                <div class="input-content">
                    <button onclick="ajaxLogin()" class="btn btn-default btn-block" id="submit_btn" type="submit">
                        登录
                    </button>
                </div>
                <div class="prompt">为了您更好的体验 <br>请使用<a href="http://w.x.baidu.com/alading/anquan_soft_down_ub/14744" target="_blank" class="special_color">谷歌浏览器</a>或者<a href="http://chrome.360.cn/" target="_blank" class="special_color">360极速浏览器</a></div>
            </from>

        </div>
    </div>
</div>
<div class="login-buttom">
    <div class="cut-rule"></div>
    <div class="copyright">Copyright ©2018&nbsp;湖南源动力科技有限公司</div>
</div>

</body>
</html>